Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

IB

Adopted By:	no NEXTSTEP classes

Declared In:	apps/InterfaceBuilder.h

Protocol Description

Interface Builder's subclass of the Application class conforms to this protocol.  Thus, objects in your custom palette can interact with Interface Builder's main module by sending messages (corresponding to the methods in this protocol) to NXApp.  For example, if your editor window wants to cause Interface Builder to remove the connection lines from the screen, it would send this message:

[NXApp stopConnecting];

Method Types

Accessing the document	- activeDocument

Accessing the selection owner	- selectionOwner

Managing connections	- connectSource
- connectDestination
- isConnecting
- stopConnecting
- displayConnectionBetween:and:

Querying the mode	- isTestingInterface

Registering controllers	- registerDocumentController:
- unregisterDocumentController:

Instance Methods

activeDocument

- activeDocument

Returns the active document, as represented by an object that conforms to the IBDocuments protocol.  (For the user, the active document is represented by the active File window.)  

connectDestination

- connectDestination

Returns the object that's the destination of the connection; that is, the object to which the user has dragged a connection line.

See also:  - connectSource

connectSource

- connectSource

Returns the object that's the source of the connection; that is, the object from which the user dragged a connection line. 

See also:  - connectDestination

displayConnectionBetween:and:

- displayConnectionBetween:source and:destination

Causes Interface Builder to draw connection lines between source and destination.   For example, when the user clicks an entry in the Connections list in the Connections inspector, Interface Builder uses this method to display the corresponding connection.

The act of displaying a connection between these two objects doesn't require that a connection really exist, and doesn't create a connection.  It's the Connection inspector's responsibility to establish the programmatic connection.  This method simply draws lines between two objects and attempts to make both objects visible.

See also:  - stopConnecting

isConnecting

- (BOOL)isConnecting

Returns YES if connection lines are being displayed in Interface Builder.  You can use this information to control how your object is drawn during the connection process.  For example, when you drag a connection line from a button, the button's black border and text are redrawn in gray.

See also:  - stopConnecting

isTestingInterface

- (BOOL)isTestingInterface

Returns YES if Interface Builder is in Test mode.

registerDocumentController:

- registerDocumentController:aController

Adds aController to the list of objects to be notified when Interface Builder documents are opened or saved.  See the IBDocumentControllers protocol for a description of the notification messages.  Controllers should be registered as the palette is loaded, perhaps as part of the IBPalette object's finishInstantiate method.

See also:  - unregisterDocumentController:

selectionOwner

- selectionOwner

Returns the editor of the currently selected object or nil if no object is selected.

stopConnecting

- stopConnecting

Causes Interface Builder to remove any connection lines from the screen.  Interface Builder uses this method to remove connection lines when the user drags a window. 

See also:  - isConnecting

unregisterDocumentController:

- unregisterDocumentController:aController

Removes aController from the list of objects to be notified when Interface Builder documents are opened or saved.

See also:  - registerDocumentController: